package exprarbre;

public class ASAOu extends ASAExpr {

    private ASAExpr e1, e2;

    public ASAOu(ASAExpr e1, ASAExpr e2) {
        this.e1 = e1;
        this.e2 = e2;
    }

    @Override
    public ASAExpr getExpr1() {
        return e1;
    }

    @Override
    public ASAExpr getExpr2() {
        return e2;
    }

    @Override
    public int evalue() {
        if (e1.evalue() != 0 || e2.evalue() != 0) {
            return 1;
        }
        return 0;
    }

    @Override
    public ASAExpr simplifie() {
        ASAExpr se1 = e1.simplifie();
        ASAExpr se2 = e2.simplifie();

        return new ASAOu(se1, se2);
    }
}